package de.dubiel.plung.client.pages.account;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.AcceptsOneWidget;

import de.dubiel.plung.client.gin.ClientGinjector;

public class AccountActivity extends AbstractActivity {
    private final ClientGinjector clientFactory;

    public AccountActivity(AccountPlace place, ClientGinjector clientFactory) {
        this.clientFactory = clientFactory;
    }

    @Override
    public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
        AccountView accountView = clientFactory.getAccountView();
        accountView.init();
        containerWidget.setWidget(accountView.asWidget());
    }
}